{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2019.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:17:49

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\FEVS_2019_PRDF_Revised_2020-04-27.csv"
{res}{text}(95 vars, 615,395 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(23,195 observations deleted)

{com}. 
. drop if q17==""
{txt}(2,698 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(25,688 observations deleted)

{com}. 
. drop if q37==""
{txt}(15,914 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(23,224 observations deleted)

{com}. 
. drop if q38==""
{txt}(2,485 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(3,739 observations deleted)

{com}. 
. drop if q15==""
{txt}(1,346 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(18,879 observations deleted)

{com}. 
. drop if q22==""
{txt}(2,755 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(10,947 observations deleted)

{com}. 
. drop if q25==""
{txt}(1,525 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(9,923 observations deleted)

{com}. 
. drop if q33==""
{txt}(1,899 observations deleted)

{com}. 
. drop if q48==.
{txt}(4,525 observations deleted)

{com}. 
. drop if q49==.
{txt}(626 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   466,027
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,050,642
{txt}{col 1}Number of PSUs{col 22}= {res}  466,027{txt}{col 49}Design df{col 67}= {res}   466,026

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8532604{col 33}{space 2}  .001105{col 44}{space 1}  772.21{col 53}{space 3}0.000{col 61}{space 4} .8510947{col 74}{space 3}  .855426
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9805998{col 33}{space 2} .0011695{col 44}{space 1}  838.49{col 53}{space 3}0.000{col 61}{space 4} .9783077{col 74}{space 3}  .982892
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .6995719{col 33}{space 2} .0013171{col 44}{space 1}  531.16{col 53}{space 3}0.000{col 61}{space 4} .6969905{col 74}{space 3} .7021533
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8475606{col 33}{space 2} .0007882{col 44}{space 1} 1075.28{col 53}{space 3}0.000{col 61}{space 4} .8460157{col 74}{space 3} .8491055
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.455029{col 33}{space 2} .0030377{col 44}{space 1}  808.19{col 53}{space 3}0.000{col 61}{space 4} 2.449075{col 74}{space 3} 2.460982
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8394973{col 33}{space 2} .0008318{col 44}{space 1} 1009.24{col 53}{space 3}0.000{col 61}{space 4}  .837867{col 74}{space 3} .8411276
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.634972{col 33}{space 2} .0035194{col 44}{space 1}  748.70{col 53}{space 3}0.000{col 61}{space 4} 2.628074{col 74}{space 3}  2.64187
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7268683{col 33}{space 2} .0010733{col 44}{space 1}  677.25{col 53}{space 3}0.000{col 61}{space 4} .7247647{col 74}{space 3} .7289718
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.291011{col 33}{space 2} .0025486{col 44}{space 1}  898.91{col 53}{space 3}0.000{col 61}{space 4} 2.286016{col 74}{space 3} 2.296006
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .6403303{col 33}{space 2} .0015023{col 44}{space 1}  426.23{col 53}{space 3}0.000{col 61}{space 4} .6373858{col 74}{space 3} .6432748
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  3.30388{col 33}{space 2} .0054926{col 44}{space 1}  601.51{col 53}{space 3}0.000{col 61}{space 4} 3.293114{col 74}{space 3} 3.314645
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7748732{col 33}{space 2} .0010318{col 44}{space 1}  750.98{col 53}{space 3}0.000{col 61}{space 4} .7728509{col 74}{space 3} .7768956
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.107427{col 33}{space 2} .0049789{col 44}{space 1}  624.11{col 53}{space 3}0.000{col 61}{space 4} 3.097668{col 74}{space 3} 3.117185
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8399273{col 33}{space 2} .0008939{col 44}{space 1}  939.63{col 53}{space 3}0.000{col 61}{space 4} .8381752{col 74}{space 3} .8416793
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.799022{col 33}{space 2} .0040384{col 44}{space 1}  693.10{col 53}{space 3}0.000{col 61}{space 4} 2.791107{col 74}{space 3} 2.806937
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8255463{col 33}{space 2} .0009762{col 44}{space 1}  845.69{col 53}{space 3}0.000{col 61}{space 4}  .823633{col 74}{space 3} .8274596
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.418726{col 33}{space 2} .0058526{col 44}{space 1}  584.14{col 53}{space 3}0.000{col 61}{space 4} 3.407255{col 74}{space 3} 3.430197
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9427261{col 33}{space 2} .0006993{col 44}{space 1} 1348.09{col 53}{space 3}0.000{col 61}{space 4} .9413554{col 74}{space 3} .9440967
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  3.93293{col 33}{space 2} .0073474{col 44}{space 1}  535.29{col 53}{space 3}0.000{col 61}{space 4}  3.91853{col 74}{space 3} 3.947331
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9156093{col 33}{space 2} .0007715{col 44}{space 1} 1186.84{col 53}{space 3}0.000{col 61}{space 4} .9140972{col 74}{space 3} .9171214
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 4.336456{col 33}{space 2} .0088862{col 44}{space 1}  488.00{col 53}{space 3}0.000{col 61}{space 4} 4.319039{col 74}{space 3} 4.353873
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2}  .281641{col 33}{space 2} .0013361{col 61}{space 4} .2790343{col 74}{space 3}  .284272
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .2952443{col 33}{space 2} .0013966{col 61}{space 4} .2925196{col 74}{space 3} .2979943
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .4716625{col 33}{space 2} .0015602{col 61}{space 4} .4686144{col 74}{space 3} .4747305
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .5899771{col 33}{space 2}  .001924{col 61}{space 4} .5862182{col 74}{space 3} .5937601
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .3995715{col 33}{space 2} .0015991{col 61}{space 4} .3964496{col 74}{space 3} .4027179
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .2945222{col 33}{space 2} .0015016{col 61}{space 4} .2915938{col 74}{space 3} .2974801
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3184733{col 33}{space 2} .0016118{col 61}{space 4} .3153299{col 74}{space 3}  .321648
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2} .1112676{col 33}{space 2} .0013185{col 61}{space 4} .1087131{col 74}{space 3} .1138821
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1616596{col 33}{space 2} .0014127{col 61}{space 4} .1589143{col 74}{space 3} .1644524
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2719468{col 33}{space 2} .0018856{col 61}{space 4}  .268276{col 74}{space 3} .2756678
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2}  .038424{col 33}{space 2} .0022936{col 61}{space 4} .0341816{col 74}{space 3} .0431928
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2} .5105992{col 33}{space 2} .0018428{col 61}{space 4} .5070002{col 74}{space 3} .5142238
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.041}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.966}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub_average_justice = mean (justice), by (level1)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2019FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2019FEVS_Justice.dta saved

{com}. exit, clear
